--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 4a12c136a058d622a65d5324739a3779eafbef81
Parents : 7e6f95e
Author : Mark Qvist <mark@unsigned.io>
Date : 2024-09-21T20:59:50+02:00
Set immutable flag on notification intent. Closes #56.
Changes
Diff
diff --git a/sbapp/services/sidebandservice.py b/sbapp/services/sidebandservice.py
index adc115bb..c73e590b 100644
--- a/sbapp/services/sidebandservice.py
+++ b/sbapp/services/sidebandservice.py
@@ -116,7 +116,7 @@ class SidebandService():
notification_intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP)
notification_intent.setAction(Intent.ACTION_MAIN)
notification_intent.addCategory(Intent.CATEGORY_LAUNCHER)
- self.notification_intent = PendingIntent.getActivity(self.app_context, 0, notification_intent, 0)
+ self.notification_intent = PendingIntent.getActivity(self.app_context, 0, notification_intent, PendingIntent.FLAG_IMMUTABLE)
notification.setContentIntent(self.notification_intent)
notification.setAutoCancel(True)
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────